package com.kara.woodAgent.agent.graph.communicate;

import com.kara.woodAgent.agent.graph.GraphContext;
import lombok.Data;

/**
 * @author tzy
 * @version 1.0
 * @project wood_agent
 * @description
 * @date 2025/6/5 15:44:53
 */
@Data
public class TransmitPayload<T extends GraphContext> implements ChannelPayload {


	private StepImage<T> image;

	public TransmitPayload(StepImage<T> image) {

		this.image = image;
	}


	public ChannelPayload basePayload() {
		ChannelPayload channelPayload = image.getChannelPayload();

		if(channelPayload instanceof TransmitPayload transmitPayload){
			return transmitPayload.basePayload();
		}
		return channelPayload;
	}


}
